package com.scau.hwadee.examination.service.impl;

import com.scau.hwadee.examination.entity.Graduaterequirment;
import com.scau.hwadee.examination.mapper.GraduaterequirmentMapper;
import com.scau.hwadee.examination.service.GraduaterequirmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: wrh
 * @Date: 2019/8/2 14:45
 */
@Service
public class GraduaterequirmentServiceImpl implements GraduaterequirmentService {
    @Autowired
    private GraduaterequirmentMapper graduaterequirmentMapper;


    @Override
    public int deleteGraduaterequirement(String grId) {
        return graduaterequirmentMapper.deleteByPrimaryKey(grId) ;
    }


    @Override
    public int addGraduaterequirement(Graduaterequirment record) {
        return graduaterequirmentMapper.insert(record);
    }

    @Override
    public int addList(List<Graduaterequirment> list) {
        return graduaterequirmentMapper.insertList(list);
    }

    @Override
    public Graduaterequirment getByMajor(String mjId) {
        return graduaterequirmentMapper.selectByMajor(mjId);
    }

    @Override
    public int updateGraduaterequirement(Graduaterequirment record) {
        return graduaterequirmentMapper.updateByPrimaryKeySelective(record);
    }
}
